<script setup lang="ts">
import { ref } from 'vue'

// import { ref } from 'vue'
// import ChildOne from './components/ChildOne.vue'

// const money = ref(100)
// const car = ref('黄包车')
// const house = ref('平房')

const genderOptions = [
  { label: '男', value: 1 },
  { label: '女', value: 0 }
]
const gender = ref(0)

const timeOptions = [
  { label: '一周内', value: 1 },
  { label: '一月内', value: 2 },
  { label: '半年内', value: 3 },
  { label: '大于半年', value: 4 }
]
const time = ref()
</script>

<template>
  <!-- <div class="article-page">父组件</div> -->
  <!-- 完整写法 -->
  <!-- <ChildOne :model-value="money" @update:model-value="money = $event" /> -->
  <!-- 改写成v-model形式 -->
  <!-- <ChildOne v-model="money" :car="car" @update:car="car = $event" /> -->
  <!-- 简化 -->
  <!-- <ChildOne v-model="money" v-model:car="car" v-model:house="house" /> -->

  <!-- 使用自定义组件 -->
  <!-- <CpRadioBtn
    :options="genderOptions"
    :model-value="gender"
    @update:model-value="gender = $event"
  /> -->

  <CpRadioBtn :options="genderOptions" v-model="gender" />
  <CpRadioBtn :options="timeOptions" v-model="time" />
</template>

<style lang="scss" scoped></style>
